<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="author" content="wangbo">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jsx语法</title>
</head>

<body>
    <div id="app"></div>
    <script type="text/javascript" src="../js/react.development.js"></script>
    <script type="text/javascript" src="../js/react-dom.development.js"></script>
    <script type="text/javascript" src="../js/babel.min.js"></script>
    <script type="text/babel">
        const myarr = ["vue", 'js', 'ES6', 'react', 'node', 'webpack', 'vue-cli']
        function myfor(arr) {
            const rtn =[]
            for (let item of myarr) {
                const span = <span>{item} </span>
                 rtn.push(span)
            }
            return rtn
        }

        const myp = <p>{   myfor(myarr)     }  </p>
        ReactDOM.render(myp, document.getElementById('app'))
    </script>


</body>

</html>